Xbasic

A5Storage_getItemProperties Function

Syntax

P itemProperties = a5Storage_getItemProperties(C connectionString , C itemName)

Arguments

connectionString

Storage connection string with ::storage:: as a prefix.

itemName

The name of the item in storage.

Returns

itemPropertiesPointer

Returns a dot variable with these properties:

itemFoundLogical

.t. or .f.

hasErrorLogical

.t. or .f.

AbsolutePathCharacter

the URL to the item

ContentTypeCharacter

the content type of the item

ModifiedTime

time item was last modified

NameCharacter

name of the item

sizeNumeric

item size

itemPointer

a dot variable with a pointer to the item object. This object exposes various methods and properties of the item.

Description

Gets properties of an item in storage, including files stored in Amazon S3 or Azure.

Example

dim properties as p
dim filename as c = "myimage.png"
properties = a5Storage_getItemProperties("::storage::disk",filename)

? properties
= AbsolutePath = "file://C:\Users\user1\Documents\AlphaAnywhere\Demo\Demo.WebProjects\Default.WebProject\images\myimage.png"
ContentType = "image/x-png"
hasError = .F.
+item.
itemFound = .T.
ModifiedTime = 06/15/2020 09:22:35 96 pm
Name = "myimage.png"
size = 2504
timeTakenMilliseconds = 4

See Also